import http from '@/utils/http'

interface BasicParams {
  dtoName: string // 参考后端接口文档
  queryId: string // 参考confluence上的页面需求SQL标识
  version: string // 参考confluence上的页面需求SQL版本号
  menuName: string // 菜单的标识，与菜单管理配置保持一致
  usage: string // 接口后缀，标识用途
}

/*
  eg./ims-tworkgz-service/viewCstHistory/getCstHistory
*/

/** 获取 getCstInfo 信息 */
export function getCstInfo({
  shopId, cstId, glassIds, lotName, site, version
}: {
  shopId: string, cstId: string, glassIds: string, lotName: string, site: string, version: string }): Promise<any> {
  const data = {
    dtoName: 'HoldByGlassCstInfoDTO',
    queryId: 'GetLotInfo',
    reasonCodeType: 'ACTIONREASON',
    shopId,
    cstId,
    glassIds,
    lotName,
    site,
    version
  }
  return http.request({
    url: '/ims-tworkgz-service/holdByGlass/getCstInfo',
    method: 'POST',
    data
  })
}
